package com.water.bs.service;

import com.sun.org.apache.xpath.internal.operations.Or;
import com.water.bs.mapper.OrgMapper;
import com.water.bs.pojo.OrgNeed;
import com.water.bs.pojo.Organization;
import com.water.bs.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class OrgService {
    @Autowired
    private OrgMapper orgMapper;

    public int isEmailRepeat(String email){return orgMapper.isEmailRepeat(email);}

    public int  saveOrgRegInfo(Map<String,Object> map){return orgMapper.saveOrgRegInfo(map);}

    public int saveOrgApplyPhoto(Map<String,Object> map){return orgMapper.saveOrgApplyPhoto(map);}

    public Organization login(Map<String,Object> map){return orgMapper.login(map);}

    public Organization keepOrgLogin(Map<String,Object> map){return orgMapper.keepOrgLogin(map);}

    public  Organization getOrgHead(String id){
        return orgMapper.getOrgHead(id);
    }

    public int saveOrgHead(Map<String,Object> map){
        return orgMapper.saveOrgHead(map);
    }

    public int updateOrg(Map<String,Object> map){return orgMapper.updateOrg(map);}

//    public OrgNeed qryOrgNeed(String orgid){ return orgMapper.qryOrgNeed(orgid);}
//
//    public int updateOrgNeed(Map<String,Object> map){return orgMapper.updateOrgNeed(map);}


    public List<Map<String,Object>> qryForMeDonation(String orgid){return orgMapper.qryForMeDonation(orgid);}

    public  int agreeDo(Map<String,Object>map){return orgMapper.agreeDo(map);}

    public List<Map<String,Object>> doFoMeHiotory(String orgid){return orgMapper.doFoMeHiotory(orgid);}

    public int createOrgNotice(Map<String,Object> map){return orgMapper.createOrgNotice(map);}
    public List<Map<String,Object>> qryOrgNoticeList(String orgid){return orgMapper.qryOrgNoticeList(orgid);}
    public Map<String,Object> getNoticePhoto(String id){return orgMapper.getNoticePhoto(id);}
    public int forgetPwd(Map<String,Object> map){return orgMapper.forgetPwd(map);}

}
